package com.lujieni.springboothutool.controller;

import com.lujieni.springboothutool.convert.PersonConvert;
import com.lujieni.springboothutool.dao.PersonDao;
import com.lujieni.springboothutool.po.PersonPO;
import com.lujieni.springboothutool.vo.PersonVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PersonController {

    @Autowired
    private PersonDao personDao;

    /**
     * 测试深拷贝
     */
    @PostMapping("/person")
    public PersonVO person() {
        PersonPO personPO = personDao.selectById("1941515632626438145");
        return PersonConvert.INSTANCE.convert(personPO);
    }

}
